package com.gome.gop.common;

import java.util.List;

/**
 * 
 * @ClassName: BaseBean
 * @Description: 基本bean,用于继承来获得通用属性
 * @author chengcheng 1294480405@qq.com
 * @date 2018年2月23日 上午11:37:58
 */
public class PageBaseBean {
    
    private CurrentUser currentUser;
    
    private String Login_SessionId;
    
    private String pageSession;
    
    private String currentDCId;
    
    private Integer page = 1;// 第几页
    
    private Integer rows = 20;// 每页行数
    
    private String sort;// 排序列名
    
    private String order;// 升降序
    
    private Integer start;// sql分页开始行
    
    private String conditions;
    
    private String createTimeStart1;
    
    private String createTimeEnd1;
    
    private String acceptDcId1;
    
    private String acceptDcCode1;
    
    private String customerNo1;
    
    /**
     * 客户集合
     */
    private List<String> archivesCode;
    
    /**
     * dc集合
     */
    private List<String> dcCode;
    
    public Page<?> createPage() {
        
        return Page.create(this.rows, this.page);
        
    }
    
    public List<String> getArchivesCode() {
        return archivesCode;
    }
    
    public void setArchivesCode(List<String> archivesCode) {
        this.archivesCode = archivesCode;
    }
    
    public List<String> getDcCode() {
        return dcCode;
    }
    
    public void setDcCode(List<String> dcCode) {
        this.dcCode = dcCode;
    }
    
    //
    public String getLogin_SessionId() {
        return Login_SessionId;
    }
    
    public void setLogin_SessionId(String login_SessionId) {
        Login_SessionId = login_SessionId;
    }
    
    public String getCurrentDCId() {
        return currentDCId;
    }
    
    public void setCurrentDCId(String currentDCId) {
        this.currentDCId = currentDCId;
    }
    
    public Integer getPage() {
        return page;
    }
    
    public void setPage(Integer page) {
        this.page = page;
    }
    
    public Integer getRows() {
        return rows;
    }
    
    public void setRows(Integer rows) {
        this.rows = rows;
    }
    
    public String getSort() {
        return sort;
    }
    
    public void setSort(String sort) {
        this.sort = sort;
    }
    
    public String getOrder() {
        return order;
    }
    
    public void setOrder(String order) {
        this.order = order;
    }
    
    public Integer getStart() {
        return start;
    }
    
    public void setStart(Integer start) {
        this.start = start;
    }
    
    /**
     * 
     * @Title: resetStart
     * @Description: 根据页码和行数生成sql limit第一个参数
     * @return void
     */
    public void reset() {
        this.start = (page - 1) * rows;
    }
    
    public String getConditions() {
        return conditions;
    }
    
    public void setConditions(String conditions) {
        this.conditions = conditions;
    }
    
    public CurrentUser getCurrentUser() {
        return currentUser;
    }
    
    public void setCurrentUser(CurrentUser currentUser) {
        this.currentUser = currentUser;
    }
    
    public String getPageSession() {
        return pageSession;
    }
    
    public void setPageSession(String pageSession) {
        this.pageSession = pageSession;
    }
    
    public String getCreateTimeStart1() {
        return createTimeStart1;
    }
    
    public void setCreateTimeStart1(String createTimeStart1) {
        this.createTimeStart1 = createTimeStart1;
    }
    
    public String getCreateTimeEnd1() {
        return createTimeEnd1;
    }
    
    public void setCreateTimeEnd1(String createTimeEnd1) {
        this.createTimeEnd1 = createTimeEnd1;
    }
    
    public String getAcceptDcId1() {
        return acceptDcId1;
    }
    
    public void setAcceptDcId1(String acceptDcId1) {
        this.acceptDcId1 = acceptDcId1;
    }
    
    public String getAcceptDcCode1() {
        return acceptDcCode1;
    }
    
    public void setAcceptDcCode1(String acceptDcCode1) {
        this.acceptDcCode1 = acceptDcCode1;
    }
    
    public String getCustomerNo1() {
        return customerNo1;
    }
    
    public void setCustomerNo1(String customerNo1) {
        this.customerNo1 = customerNo1;
    }
    
    @Override
    public String toString() {
        return "PageBaseBean{" + "currentUser=" + currentUser + ", Login_SessionId='" + Login_SessionId + '\'' + ", pageSession='" + pageSession + '\'' + ", currentDCId='"
            + currentDCId + '\'' + ", page=" + page + ", rows=" + rows + ", sort='" + sort + '\'' + ", order='" + order + '\'' + ", start=" + start + ", conditions='" + conditions
            + '\'' + ", createTimeStart1='" + createTimeStart1 + '\'' + ", createTimeEnd1='" + createTimeEnd1 + '\'' + ", acceptDcId1='" + acceptDcId1 + '\'' + ", acceptDcCode1='"
            + acceptDcCode1 + '\'' + ", customerNo1='" + customerNo1 + '\'' + ", archivesCode=" + archivesCode + ", dcCode=" + dcCode + '}';
    }
}
